local UIBase = require("view.UIBase")
local LoadView = class("LoadView", UIBase)

function LoadView:ctor()
    local resource = {
        path = "Prefabs/View",
        name = "LoadView",
        canvas = 3
    }
    LoadView.super.ctor(self, resource)
end

function LoadView:start()
    self._textProgress.text = ""
    self._bar.fillAmount = 0
end

function LoadView:update()
end

function LoadView:setTextTips(text)
    printDebug(text)
    self._textTips.text = text
end

function LoadView:updateBar(cur, total)
    self._textProgress.text = cur .. "/" .. total
    if total == 0 then
        self._bar.fillAmount = 1
    else
        self._bar.fillAmount = cur / total
    end
end

return LoadView
